﻿using System;
using System.Linq;
using System.Linq.Expressions;

namespace OS.Infrastructure.Domain
{
    public interface IReadOnlyRepository<T> where T : class
    {
        IQueryable<T> All();
        T FindBy(Expression<Func<T, bool>> expression);
        IQueryable<T> FilterBy(Expression<Func<T, bool>> expression);
        T FindBy(Specification<T> criteria);
        IQueryable<T> FilterBy(Specification<T> criteria);
    }
}